﻿<Window x:Class="Pvp.App.View.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:res="clr-namespace:Pvp.App.Resources"
        xmlns:view="clr-namespace:Pvp.App.View"
        xmlns:app="clr-namespace:Pvp.App"
        xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
        xmlns:cmd="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras.WPF45"
        Title="{x:Static res:Resources.program_name}" Height="350" Width="525"
        MinHeight="150" MinWidth="480"
        DataContext="{x:Static app:ViewModelLocator.MainWindowViewModel}"
        Style="{DynamicResource MainWindowStyle}"
        AllowDrop="True">
    <Window.Resources>
        <view:LocalizationConverter x:Key="LocConverter" />
        <view:LocalizationHelper x:Key="LocHelper" />
    </Window.Resources>
    
    <view:MainView x:Name="_mainView" />

    <i:Interaction.Triggers>
        <i:EventTrigger EventName="KeyDown">
            <cmd:EventToCommand Command="{Binding KeyDownCommand}" PassEventArgsToCommand="True" />
        </i:EventTrigger>
        <i:EventTrigger EventName="MWKeyDown" SourceObject="{Binding RelativeSource={RelativeSource AncestorType=Window}, Path=MWEventSource}">
            <cmd:EventToCommand Command="{Binding KeyDownCommand}" PassEventArgsToCommand="True" />
        </i:EventTrigger>
        <i:EventTrigger EventName="MouseWheel">
            <cmd:EventToCommand Command="{Binding MouseWheelCommand}" PassEventArgsToCommand="True" />
        </i:EventTrigger>
        <i:EventTrigger EventName="MWMouseWheel" SourceObject="{Binding RelativeSource={RelativeSource AncestorType=Window}, Path=MWEventSource}">
            <cmd:EventToCommand Command="{Binding MouseWheelCommand}" PassEventArgsToCommand="True" />
        </i:EventTrigger>
    </i:Interaction.Triggers>
</Window>
